package com.wmcsk.dl.dl.internal;

import android.app.Activity;

import com.wmcsk.dl.dl.DLPlugin;


public interface DLAttachable {
	 /**
     * when the proxy impl ( {@see DLProxyImpl#launchTargetActivity()} ) launch
     * the plugin activity , dl will call this method to attach the proxy activity
     * and pluginManager to the plugin activity. the proxy activity will load
     * the plugin's resource, so the proxy activity is a resource delegate for
     * plugin activity.
     * 
     * @param proxyActivity a instance of DLPlugin, {@see DLBasePluginActivity}
     *            and {@see DLBasePluginFragmentActivity}
     * @param pluginManager DLPluginManager instance, manager the plugins
     */
    public void attach(DLPlugin proxyActivity, DLPluginManager pluginManager);
    /**
     * 获取插件packageName
     * @return
     */
    public String getPluginPackageName();

    /**
     *
     * @return  获取插件activity
     */
    public Activity getPluginActivity();

    /**
     *
     * @return  设置当前activity是否可见，解决多次跳转问题
     */
    public boolean isVisibleActivity();
    public void setVisibleActivity(boolean isVisibleActivity);
}
